﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Windows;

namespace IOA.MES.Client.FinalInspection
{
    /// <summary>
    /// FinalTip.xaml 的交互逻辑
    /// </summary>
    public partial class FinalTip : Window
    {
        public FinalTip()
        {
            InitializeComponent();
        }
        private void Window_Loaded(object sender, RoutedEventArgs e)
        {
            this.Topmost = true;
        }

        public void SetData(List<KeyValuePair<string, string>> data)
        {
            lbBarCode.Content = data.FirstOrDefault(_ => string.Equals("条码", _.Key, StringComparison.CurrentCultureIgnoreCase)).Value ?? "-";
            lbQLevel.Content = data.FirstOrDefault(_ => string.Equals("等级", _.Key, StringComparison.CurrentCultureIgnoreCase)).Value ?? "-";
            lbLock.Content = data.FirstOrDefault(_ => string.Equals("是否锁定", _.Key, StringComparison.CurrentCultureIgnoreCase)).Value ?? "-";
        }
    }
}
